$(function () {
    var courseId = $("#courseId").val();
    //加载直播课程目录
    loadLiveCatalog(courseId);

    /**
     * 加载直播课程目录
     * @param courseId 课程ID
     */
    function loadLiveCatalog(courseId) {
        $.ajax({
            url: baseloaction +'/web/course/loadLiveCatalog',
            beforeSend:function(XHR){
                $("#course-catalog-box").html('<div class="mt20 pt10 mr20 ml10"><div class="text-center pt10 pb10"><span class="loading"></span></div></div>');
            },
            type:'post',
            dataType:'html',
            data:{
                'courseId':courseId
            },
            success:function (result) {
                $("#course-catalog-box").html(result);
                tchpterFun(); //目录展开与折叠
            }
        });
    }
});